package demo0509;

import java.util.ArrayList;
import java.util.List;

public class Test {
	public static List<Student> getStudentList() {
		List<Student> slist = new ArrayList<>();
		slist.add(new Student("123", "li"));
		slist.add(new Student("124", "zhangsan"));
		slist.add(new Student("125", "wangwu"));
		return slist;
	}
	
	public  List<Student> getStudentList1() {
		List<Student> slist = new ArrayList<>();
		slist.add(new Student("123", "li"));
		slist.add(new Student("124", "zhangsan"));
		slist.add(new Student("125", "wangwu"));
		return slist;
	}
	public static void main(String args[]) {
		List<Student> studentList=Test.getStudentList();
		for(Student s:studentList) {
			System.out.println(s.getName());
		}
		
		Test test=new Test();
		
		List<Student> studentList1=test.getStudentList1();
		for(Student s:studentList1) {
			System.out.println(s.getName());
		}
		
	}




}


 class Student {

	private String no;
	private String name;

	public Student(String no, String name) {
		super();
		this.no = no;
		this.name = name;
	}

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "Student [no=" + no + ", name=" + name + "]";
	}

}
